/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * jfrmMenu.java
 *
 * Created on 14/03/2011, 11:33:15 PM
 */

package jdemonbd.presentacion;

import jdemonbd.presentacion.usuario.jDlgAdminUsuarios;

/**
 *
 * @author kakashi
 */
public class jfrmMenu extends javax.swing.JFrame {

    /** Creates new form jfrmMenu */
    public jfrmMenu() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jmnuPrincipal = new javax.swing.JMenuBar();
        jmnuArchivo = new javax.swing.JMenu();
        jmnuEditar = new javax.swing.JMenu();
        jmnuUsuarios = new javax.swing.JMenu();
        jmnuGestUsers = new javax.swing.JMenu();
        jmnuNuevoUsuario = new javax.swing.JMenuItem();
        jmuVerUsuarios = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 420, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 392, Short.MAX_VALUE)
        );

        jmnuArchivo.setText("File");
        jmnuPrincipal.add(jmnuArchivo);

        jmnuEditar.setText("Edit");
        jmnuPrincipal.add(jmnuEditar);

        jmnuUsuarios.setText("Usuarios");

        jmnuGestUsers.setText("Gestionar Usuarios");

        jmnuNuevoUsuario.setText("Nuevo Usuario");
        jmnuNuevoUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmnuNuevoUsuarioActionPerformed(evt);
            }
        });
        jmnuGestUsers.add(jmnuNuevoUsuario);

        jmuVerUsuarios.setText("Ver Usuarios");
        jmuVerUsuarios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmuVerUsuariosActionPerformed(evt);
            }
        });
        jmnuGestUsers.add(jmuVerUsuarios);

        jmnuUsuarios.add(jmnuGestUsers);

        jmnuPrincipal.add(jmnuUsuarios);

        setJMenuBar(jmnuPrincipal);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
        // TODO add your handling code here:
        this.setLocationRelativeTo(null);
    }//GEN-LAST:event_formWindowOpened

    private void jmnuNuevoUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmnuNuevoUsuarioActionPerformed
        // TODO add your handling code here:
        new jDlgAdminUsuarios(this, true).setVisible(true);
    }//GEN-LAST:event_jmnuNuevoUsuarioActionPerformed

    private void jmuVerUsuariosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmuVerUsuariosActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jmuVerUsuariosActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new jfrmMenu().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jPanel1;
    private javax.swing.JMenu jmnuArchivo;
    private javax.swing.JMenu jmnuEditar;
    private javax.swing.JMenu jmnuGestUsers;
    private javax.swing.JMenuItem jmnuNuevoUsuario;
    private javax.swing.JMenuBar jmnuPrincipal;
    private javax.swing.JMenu jmnuUsuarios;
    private javax.swing.JMenuItem jmuVerUsuarios;
    // End of variables declaration//GEN-END:variables

}
